package com.example.anliku.mapper;

import com.example.anliku.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;import java.util.List;

@Mapper
public interface UserMapper {
    int deleteByPrimaryKey(String userId);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(String userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectAllByUserIdAndUserPwd(@Param("userId") String userId, @Param("userPwd") String userPwd);

    int updateUserPwdByUserId(@Param("updatedUserPwd") String updatedUserPwd, @Param("userId") String userId);

    List<User> selectALL();

    List<User> selectByUserRealname(@Param("userRealname") String userRealname);

    List<User> selectAllByUserPhone(@Param("userPhone") String userPhone);

    String selectUserRealnameByUserIdAndUserState(@Param("userId") String userId, @Param("userState") Integer userState);

    int updateUserOpenidByUserId(@Param("updatedUserOpenid")String updatedUserOpenid,@Param("userId")String userId);

    User selectByUserOpenid(@Param("userOpenid")String userOpenid);
}